1. Field of the Invention
The present invention relates to a method of magnifying bit map font data in a horizontal direction, more particularly, it relates to a method of magnifying bit map font data suitable for half density printing, in a horiztontal direction and at a predetermined magnification rate, to obtain magnified bit map font data still sutiable for half density printing.
2. Description of the Related Art
Dot matrix printers, for example, twenty-four pin dot matrix printers, have a characteristic such that the quality of a printed character is high, and that various modifications of a character style are possible. One such modification is magnification of a character.
The simplest algorithm used for magnifying a character made of bit map data, in a horizontal/vertical direction, is a method of multiplying each bit in each of the horizontal/vertical directions by each magnification rate, e.g., at a magnification rate of two, as shown in FIG. 1.
The above method, however, is not applicable to the twenty-four pin printers currently in use, because they perform half density printing to improve the quality of the printed characters.
An example of bit map data modified for the half density printing is showing in FIG. 2. This a bit map font data for the number "4".
As shown in FIG. 2, in the bit map data modified for the half density printing, the number of bits provided is more than the minimum number of bits needed to recognize the character or number, and accordingly, because so many bits are provided to represent each character, the half density printing method can produce various types of character style, for example, Gothic style, Italic style, or even a cursive script style, in detail, and smoothly, with a good anesthetic appearance.
In the example of FIG. 2, when, for example, an oblique solid line which is a part of the construction of the number "4", is printed on a paper by a dot matrix printer, a high quality printing with a smooth outline (without noticeable nodes or snaking) can be obtained. FIG. 3 shows a simulated printed result of the bit map data of FIG. 2, wherein each circle filled with oblique lines shows a printed dot mark corresponding to one dot indicated by a black mesh in FIG. 2.
Another characteristic of the bit map data for the half density printing is that, as shown in FIG. 2, a "1" dot is not followed by a "1" dot in a series of bit data representing a solid line in the horizontal direction, and more than a predetermined number (for example, two in FIG. 2) of successive "0's" does not appear in the solid line, where "1" means print, and "0" means not print.
The reason why the solid line in the horiztontal direction in the bit map data for the half density printing is represented by a series of bit data as mentioned above, is related to the mechanism of the dot matrix printers and is explained as follows.
FIGS. 4 and 5 show an outline of the construction of a dot matrix printer. In FIGS. 4 and 5, reference numeral 11 denotes a platen, 12 denotes a paper, 22 denotes a printing heat, 21 denotes a carriage for the printing head, and 221-1, 221-2, . . . 221-4 denote twenty-four head pins (dot wires).
The twenty-four head pins (dot wires) 221-1, 221-2, . . . 221-24 are mounted in a portion 221 which protrudes toward the platen 11, in the printing head 22, and each of the head pins (dot wires) 221-1, 221-2, . . . 221-24 is moved toward the platen 11 by driving an exciting coil (not shown) provided to move each of the head pins 221-1, 221-2, . . . 221-24. A paper 12 and an ink ribbon (not shown) are set to intervene between the tops of the head pins 221-1, 221-2, . . . 221-24 and the surface of the platen 11. Accordingly, when a head pin 221-i is moved toward the platen 11, a dot portion of the ink ribbon, corresponding to the position of the moved head pin 221-i, is pressed on the paper 12 which is rolled on the platen 11, and therefore, a dot mark is printed on the paper 12.
The head pins 221-1, 221-2, . . . 221-24 are arranged in a row in the direction vertical to the axis of the platen 11, and parallel to a tangent line of a circumference of the platen 11, and thus, for example, a series of data in each column (each series of data in the vertical direction) of the bit map data of FIG. 2, can be printed on the paper 12 at one time.
Further, the carriage 21 mounting the printing head 22 is moved in the direction parallel to the axis of the platen 11 (hereinafter called horizontal direction). By moving the carriage 21 in the horizontal direction at an appropriate speed, each series of data in each column in a bit map font data (for example, each series of data in each column in the bit map font data as shown in FIG. 2) is printed on a paper 12, one column by one column.
Therefore, the speed of printing greatly depends on the speed at which the carriage 21 is moved, but this speed is limited by the time needed for each head pin 221-i to press a succeeding dot after pressing a preceding dot, i.e., a recovery time or cycle time of a piston motion of a head pin 221-i, when printing two dots in succession, driven by an exciting coil.
If a series of bit data representing a solid line in the horizontal direction includes successive "1's", where "1" means print, the carriage 21 moves in the horizontal direction at a sepped of less than one dot per T (sec), where T (sec) is the abovementioned cycle time of the piston motion of each head pin 221-i, but, if the above mentioned series of bit data, representing a solid line in the horizontal direction and including successive "1's", is modified so that no successive "1's" are included in the series of bit data, the speed at which the carriage 21 is moved can be made faster than the speed of the carriage in the abovementioned case when including successive "1's". For example, a series of bit data representing a solid line in the horizontal direction, are made to have a "1" on alternate dots, the moving speed of the carriage 21 can be made doubled compared with the abovementioned case including successive "1's".
Moreover, the series of bit data representing a solid line in the horizontal direction in the bit map data shown in FIG. 2 includes two successive "0's". These successive "0's" are provided for maintaining a length of the solid line represented mainly by the alternate dots, i.e., for making each end dot of the solid line "1". Generally, the lengthes of solid lines which are a part of a character must be maintained even after magnification, to maintain the character style.
FIGS. 6, 7 and 8 show examples of marks made by printed dots and not-printed dots respectively corresponding to different series of bit data, each under a common predetermined dimensional condition of the pitch of the dots in the horizontal direction and the diameter of the mark printed by the dot data "1", for example, the pitch of the dots is 1/360" and the diameter of the mark is 1/120" (about 0.2 mm). A printed dot is shown by a circle filled with oblique lines, and a not-printed dot is shown by a blank circle. The very large overlap of the circles indicating dots adjacent to each other, creates the smoothness of outlines of the printed character made by a series of dot marks.
The marks made by printed dots and a not-printed dot shown in FIG. 6, corresponds to a series of bit data "101", the marks made by printed dots and not-printed dots shown in FIG. 7, corresponds to a series of bit data "1001", and the marks made by printed dots and not-printed dots shown in FIG. 8, corresponds to a series of bit data "10001".
Under the abovementioned dimensional conditions, as shown in FIG. 6, a series of bit data consisting of successive "10's" appears as an almost smooth solid line, and as shown in FIG. 7, even a portion printed in accordance with the series of bit data "1001", appears to be connected. But, as shown in FIG. 8, a portion printed in accordance with the series of bit data "10001", appears to be disconnected, i.e., as having a blank portion.
This means that, under the above dimensional condition of the pitch of dots and the diameter of a printed mark, a series of bit data representing a solid line in the horizontal direction, which series of bit data dos not include more than two successive "0's", appears to be a solid line when printed.
Generally, depending on the dimensional conditions of the pitch of dots and the diameter of a printed mark, the maximum allowable number of successive "0's" in a series of bit data to represent to a solid line in the horizontal direction in a bit map font data for half density printing, will change. A general requirement for a series of bit data to represent a solid line in the horizontal direction in a bit map font data for half density printing, is that a "1" dot is not followed by a "1", and that more than a predetermined number of successive "0's" do not appear in the series of bit data, and a series of bit data representing a solid line in the horizontal direction must still satisfy the above requirement even after magnification in the horizontal direction.
Since the above requirement relates only to the magnification in the horizontal direction, a simple multiplication of each bit of an original bit map font data as shown in FIG. 1, can be applied to the magnification in the vertical direction.
FIG. 9 shows an example of a detailed process of carrying out a conventional method of magnifying a bit map font data for half density printing in the horizontal direction at a magnification rate of three. In the example of FIG. 9, a series of bit data in the horizontal direction, which is sampled from the portion shown by (A) in the bit map font data of FIG. 2, which is shown in FIG. 10, is used as an original series of bit data to be magnified in the horizontal direction.
In the conventional method of magnifying a bit map font data for half density printing in the horizontal direction shown in FIG. 9, at the first step, an intermediate magnification-stage magnified element is generated from each bit of the original series of bit data as follows: an original bit "1" generates h "10's" where h is a magnification rate; and an original bit "0" generates h "00's", when the magnification rate is three, an orignial bit "1" generates "101010"; and an original bit "0" generates "000000".
At the second step, the positions of columns for the intermediate-stage magnified element for each of the original "1's" and "0's" are arranged in the order in which the "1's" and "0's" are arranged in the original font data, and the positions of the two intermediate-stage magnified elements adjacent to each other are arranged with a difference of h columns.
At the third step, an OR logic of all bits in each of the columns, each of which bits is a component of the intermediate-stage magnified elements, and the positions of which bits have been arranged at the above second step, is calculated.
A general algorithm to obtain the value of each bit in the magnified series of bit data by the conventional method of magnifying a bit map font data for half density printing in the horizontal direction, which covers the abovementioned process of the magnification shown in FIG. 9, is shown in FIG. 11, using a flow chart. In FIG. 11, a column number of an original data is shown by "a", a column number of a magnified data is shown by "b", and a total number of columns consitituting the original bit map data is shown by "W".
At step 101 of FIG. 11, and initial setting of the column number of an original data is carried out as a=1.
At step 102 in FIG. 11, an initial setting of the column number of a magnified data is carried out as b=1.
At step 103 in FIG. 11, the conventional basic equation for writing a magnified data, for generating a magnified data, is applied.
At step 104 of FIG. 11, the column number of the magnified data is incremented by two.
At step 105 of FIG. 11, it is determined whether or not the original data is written h (the magnification rate, for example, three) times.
At step 106 of FIG. 11, the column number of the original data is incremented.
At step 107 of FIG. 11, it is determined whether or not the column number of the original data is smaller than or equal to W.
In the conventional basic equation for writing a magnified data for generating a magnified data, at step 103, to obtain a value (b) of each column b in the magnified series of bit data; a calculation of an OR logic of a value (a) of the corresponding column a in the original series of bit data, and the value (b) of the same column b obtained in the previous cycles, is carried out; and then a calculation is made of an AND logic of the result of the above OR logic calculation of each column b and the inverted value (b-1) of the one column before b-1 in the magnified bit map data.
The above OR logic calculation in step 103, corresponding to, for example, the operation at the third step in the aforementioned process of FIG. 9, means that the magnified bit map data obtained in all cycles in the process of FIG. 11 must be superposed, and the above AND logic calculation in the stop 103 means that a "1" dot must not be followed by a "1" dot (hereinafter called a successive "1's" inhibition rule).
At stps from 102 to 105, the values in alternate columns from the column number b=h(a-1)+1 to b=h(a+1)+1 in the magnified bit map data, are obtained for each column a of the original data, and in steps 101 to 107, the values in all columns (b) in the magnified bit map data corresponding to all columns a in the original bit map data, are obtained. In the process of FIG. 11, the values in the columns corresponding to the even-numbered columns in the aforementioned intermediate magnification-stage magnified element, for example, "0's" in the aforementioned h "0's" in FIG. 9, are not calculated, because these are always zero, and do not affect the result of the OR calculation.
Returning to FIG. 9, the result of the magnified bit map data of FIG. 9, includes more than two successive "0's", i.e., "0000". Under the aforementioned dimensional condition of the pitch of dots and the diameter of the printed dots, as understood by referring to FIG. 8, these successive "0's", i.e., "0000", generate a blank portion in a solid line when printed.
Namely, by the conventional method of magnification it is impossible to effectively prevent the appearance of a visible blank portion in the bit map data for half density printing, when magnified in the horizontal direction, and which should represent a solid line in the horizontal direction, when printed. Therefore, when a character constituted by a bit map font data for half density printing, is magnified in the horizontal direction by the conventional method of magnification, and printed, the original character style is sometimes damaged due to an appearance of a blank portion in a solid line in the horizontal direction, which solid line composes a part of the construction of the character.